import request from '@/axios'

//获取枚举数据
export const getPayEnumApi = (params?: any) => {
  return request.get({ url: '/admin/orderPayment/resource', params })
}
//获取列表数据
export const getListApi = (params?: any) => {
  return request.get({ url: '/admin/orderPayment', params })
}
//获取回显数据
export const getDetailApi = (id: string | number, params?: any) => {
  return request.get({ url: `/admin/orderPayment/${id}`, params })
}

//支付信息审核
export const paymentInformationReviewApi = (id: string | number, data) => {
  return request.put({ url: `/admin/orderPayment/${id}`, data })
}

export const uploadPaymentApi = (data) => {
  return request.put({ url: `/admin/orderPayment/voucher`, data })
}

//撤销审核
export const cancelVoucherApi = (data) => {
  return request.put({ url: `/admin/orderPayment/cancellVoucher`, data })
}
//导出数据
export const exportDataApi = (params = {}, filename: string) => {
  return request.exportFile({
    method: 'post',
    url: '/admin/orderPayment/export',
    params,
    filename
  })
}
